package com.csyf.manager.config.shiro;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Component;

/**
 * @Author: casper
 * @Description: js调用 thymeleaf 实现按钮权限
 * @Date: Created in 2018/11/23 9:09
 */
@Component("perms")
public class PermsService {

    public boolean hasPerm(String permission) {
        return SecurityUtils.getSubject().isPermitted(permission);
    }

}
